package com.jzr.medical.auth;

import org.springframework.security.crypto.password.PasswordEncoder;

public class MyPasswordEncoder implements PasswordEncoder {
    @Override
    public String encode(CharSequence charSequence) {
        if(charSequence == null){
            return "";
        }
        return charSequence.toString();
    }

    @Override
    public boolean matches(CharSequence charSequence, String s) {
        if(charSequence == null || s == null){
            return false;
        }
        return s.equals(charSequence.toString());
    }
}
